package com.model;
// default package

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;


/**
 * PaperProgram entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name="db_paperprogram"
    ,catalog="acmctgu"
)

public class PaperProgram  implements java.io.Serializable {


    // Fields    

     private Integer id;
     private Programming programming;
     private Paper paper;
     private Integer pnum;


    // Constructors

    /** default constructor */
    public PaperProgram() {
    }

	/** minimal constructor */
    public PaperProgram(Programming programming, Paper paper) {
        this.programming = programming;
        this.paper = paper;
    }
    
    /** full constructor */
    public PaperProgram(Programming programming, Paper paper, Integer pnum) {
        this.programming = programming;
        this.paper = paper;
        this.pnum = pnum;
    }

   
    // Property accessors

    @Id @GeneratedValue
    @Column(name="id", unique=true, nullable=false)

    public Integer getId() {
        return this.id;
    }
    
    public void setId(Integer id) {
        this.id = id;
    }
	@ManyToOne(fetch=FetchType.LAZY)
        @JoinColumn(name="programid", nullable=false)

    public Programming getProgramming() {
        return this.programming;
    }
    
    public void setProgramming(Programming programming) {
        this.programming = programming;
    }
    @ManyToOne(fetch=FetchType.LAZY)
        @JoinColumn(name="paperid", nullable=false)

    public Paper getPaper() {
        return this.paper;
    }
    
    public void setPaper(Paper paper) {
        this.paper = paper;
    }
    
    @Column(name="pnum")

    public Integer getPnum() {
        return this.pnum;
    }
    
    public void setPnum(Integer pnum) {
        this.pnum = pnum;
    }
   








}